{template 'header', $module}
{if $item == 'friend'}
<div class="main-block bd-gray mt10">
    <div class="hd fn-clear">
        <h2 class="fn-left">我的好友</h2>
    </div>
    <ul id="data-nav" class="main-nav mt10 fn-clear">
        <li id="status_"><a href="{url('member/friend')}?action=add">添加好友</a></li>
        <li id="status_3"><a href="{url('member/friend')}?status">我的好友</a></li>
        <li id="status_2"><a href="{url('member/type')}?item=friend&status=2">好友分类</a></li>
    </ul>
{/if}
{if $item == 'favorite'}
	<div class="main-block bd-gray mt10">
		<div class="hd fn-clear">
			<h2 class="fn-left">加入收藏</h2>
		</div>
		<ul id="data-nav" class="main-nav mt10 fn-clear">
			<li id="status_1"><a href="favorite.php?action=add&status=1">添加收藏</a></li>
			<li id="status_"><a href="favorite.php">我的收藏</a></li>
			<li id="status_2"><a href="type.php?item=favorite&status=2">收藏分类</a></li>
	</ul>
{/if}
{if $MG[type_limit] > -1}
<script type="text/javascript">
	var _del = 0;
</script>
<form method="post" action="type.php">
	<input type="hidden" name="item" value="{$item}"/>
    <table width='730'  class="filter-tb mt10 c000 con" >
        <tr class="c666">
            <th  width="60">删</th>
            <th  width="80">排序</th>
            <th  >名称</th>

        </tr>
        {loop $types $k $v}
            <tr>
                <td><input class="nobd" name="type[{$v[typeid]}][delete]" type="checkbox" value="1" onclick="if(this.checked){_del++;}else{_del--;}"/></td>
                <td><input name="type[{$v[typeid]}][listorder]" type="text" size="5" value="{$v[listorder]}" maxlength="3"/></td>
                <td><input name="type[{$v[typeid]}][typename]" type="text" size="20" value="{$v[typename]}" maxlength="50" style="width:200px;color:{$v[style]}"/> {$v[style_select]}</td>
            </tr>
        {/loop}
        <tr>
            <td class="cred">新增</td>
            <td ><input name="type[0][listorder]" type="text" size="5" value="" maxlength="3"/></td>
            <td><input name="type[0][typename]" type="text" size="20" value="" maxlength="50" style="width:200px;"/> {$new_style}</td>

        </tr>
    </table>
    <div class="con">
        <input type="submit" name="submit" value="提交" onclick="if(_del && !confirm('提示:您选择删除'+_del+'个分类？确定要删除吗？')) return false;" class="btn"/>
        {if $MG[type_limit]}&nbsp;最多可定义 <strong class="cred">{$MG[type_limit]}</strong> 个分类&nbsp;&nbsp;&nbsp;当前已定义 <strong class="f_blue">{count($types)}</strong> 个{/if}
    </div>
</form>
 </div>
{else}
<br/><br/>
<center class="cred">抱歉，您没有权限自定义分类</center>
<br/><br/>
{/if}
<script type="text/javascript">
    seajs.use(['member'], function(member){
        member.active('menu_general', '{$item}', 'status_{$status}');
    });
</script>
{template 'footer', $module}